﻿@model IQueryable<Model.shopCar>
@{
    ViewBag.Title = "我的购物车";
}
<div class="g-header-wrapper">
    <div class="g-header">
        我的购物车
    </div>
</div>
<div class="shopping-title">
    <label class="checkbox">
        <div class="vam check iconfont"></div>
        全选
    </label>
    <span class="good">商品</span>
    <span class="price">单价</span>
    <span class="num">数量</span>
    <span class="sum">小计</span>
    <span class="del">删除</span>
</div>
<div class="shopping-wrapper">
    @if (Model == null || Model.Count() == 0)
    {
        <div class="iconfont icon-gouwuche has-no-data"><div>您的购物车还是空的</div></div>
    }
    else
    {
        foreach (var item in Model)
        {
            <div class="sp-item" id="@item.ID">
                <label class="checkbox">
                    <div class="vam check iconfont"></div>
                </label>
                <img src="~/Content/images/@item.goods.goodImage" />
                <span class="good">@item.goods.goodName</span>
                <span class="price"><span class="rmb">￥@(item.goodPrice)</span><br /></span>
                <span class="num"><input id="@item.ID" type="number" min="1" value="@item.goodNum" /></span>
                <span class="sum"><span class="rmb">￥@(item.sumPrice)</span><br /></span>
                <span class="del" id="@item.ID">删除</span>
            </div>
        }
    }
</div>
<div class="submit-good-wrapper">
    <label class="checkbox">
        <div class="vam check iconfont"></div>
        全选
    </label>
    <span class="del-sel">删除</span>
    <button>立即结算</button>
    <div class="sub-sum">
        <div class="small">已选择<span></span>件商品</div>
        <div class="sum">总计<span>0</span><span></span></div>
    </div>
</div>
@section css{
    <link href="~/Content/css/iconfont1.css" rel="stylesheet" />
    <link href="~/Content/css/shoppingcar.css" rel="stylesheet" />
}

@section scripts{
    <script src="~/Scripts/jquery-3.3.1.js"></script>
    <script src="~/Scripts/shoppingcar.js"></script>
}
